package com.ferryc.modules.sys.util;

import javax.servlet.http.HttpServletRequest;

import com.ferryc.commons.utils.CommonUtil;
import com.ferryc.commons.utils.WebUtil;
import com.ferryc.modules.sys.entity.SysUser;

/**
 * 系统标签函数
 * 
 * @author ferry
 *
 */
public class Functions {

	private Functions() {

	}

	/**
	 * 获取当前登录用户
	 * 
	 * @return
	 */
	public static SysUser getLoginUser() {
		return UserUtils.getShiroUser();
	}

	public static String getCookieValue(String name) {
		HttpServletRequest request = CommonUtil.getHttpRequest();
		return WebUtil.getCookieValue(request, name);

	}

}
